<template>
    <div class="page absolute t0 flex col flexCenter borderbox">
        <img class="imgTop" :src="imgSrc" alt="">
        <p class="price fs18 bold">{{msg}}</p>
        <p class="price fs18 mt5" v-if="failMsg">{{failMsg}}</p>
        <!-- <img class="imgBot" src="../../../images/youhui1.png" @click="toNext()" /> -->
        <span class="price btn flex flexCenter w100 pt10 pb10" @click="toNext('login')">返回首页</span>
    </div>
</template>
<script>
import { XButton } from 'vux';
export default {
    name:'payMoneyEnd',
    data(){
        let failed = !!this.$route.query.failed;
        return {
            msg:failed ? '支付失败' : "支付成功",
            failMsg: failed ? "重新支付点击查看订单" : "",
            imgSrc: failed ? require('../../../images/组 48@2x.png') : require('../../../images/组 49@2x.png'),
        }
    },
    components:{
        XButton,
    },
    methods:{
        toNext(to){
            // this.$Toast();
            this.$router.push({path:'/' + (to || '')});
        }
    }
}
</script>
<style lang="less" scoped>
.page{
    background:#f6f6f6;
    width:100%;
    height:100%;
    padding:1rem 1rem 0rem;
    .imgTop{
        width:40%;
        margin-top:1rem;
        margin-bottom:0.4rem;
    }
    .imgBot{
        margin-top:5rem;
        margin-bottom:2rem;
    }
    .btn{
        border:1px solid #ff3b32;
        border-radius: 5rem;
        margin-top:2rem;
    }
}
.price{
    color:#ff3b32;
}
</style>
